package com.richpencil.modules.weixin.service;

import com.jfinal.weixin.sdk.api.SnsAccessToken;
import com.richpencil.modules.weixin.domain.UrlEntry;
import com.richpencil.modules.weixin.domain.WaswxmpConfig;
import com.richpencil.modules.weixin.domain.WxResult;
import com.richpencil.modules.weixin.domain.queryFrontInstance;
import org.springframework.cache.annotation.CacheConfig;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.cache.annotation.Cacheable;

@CacheConfig(cacheNames = "wxconfig")
public interface WxService {
    String encodeWeixinAuthUrl(String fconfigid, String fsysid, String fid);
    String encodeState(String fconfigid,String ftype,String fid);
    String getVueUrl(UrlEntry entry);
    UrlEntry decodeState(String state);
    public queryFrontInstance queryFrontUrl(String factionid, String fuseridiv, String wxcode, String ip);
    public void createWxUser();
    public WxResult getWxResult(String WxCode, String ip);
    public WxResult getWxResult(SnsAccessToken snsAccessToken, String ip);

    @Cacheable(key = "'defaultone'")
    public WaswxmpConfig getDefaultOne() throws Exception;
    @CacheEvict(key = "'defaultone'")
    public void updateDefaultOne();


}
